public class FruitKingNBException extends RuntimeException {

    private NBStatus status;

    private String message = null;

    public FruitKingNBException(NBStatus status,String message){
        this.status = status;
        this.message = message;
    }

    public FruitKingNBException(NBStatus status){
        this.status = status;
    }

    public int getErrorNo(){
        return status.getErrorNo();
    }

    public String getError(){
        if (message!=null){
            return status.getError() + ": "+message;
        }else{
            return status.getError();
        }
    }


}
